package com.beyond.trace.requestVo;

import com.beyond.trace.domain.ScreenConfigure;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @ClassName: ScreenConfigureAddReq
 * @author: z越
 * @date: 2024/4/7  13:46
 * @description
 */
@Data
@ApiModel("大屏配置新增参数")
public class ScreenConfigureAddReq {
    /**所属模块*/
    @ApiModelProperty("所属模块")
    @NotBlank(message = "所属模块不能为空")
    private String model;
    /**文字内容*/
    @ApiModelProperty("文字内容")
    private String content;
    /**所属资源*/
    @ApiModelProperty("所属资源")
    private String resource;
    /**备注*/
    @ApiModelProperty("备注")
    private String notes;
    /**视频封面*/
    @ApiModelProperty("视频封面")
    private String videoCover;
    /**点位*/
    @ApiModelProperty("点位")
    private String pointPosition;

    public ScreenConfigure toPo() {
        ScreenConfigure po = new ScreenConfigure();
        po.setModule(this.model);
        po.setContent(this.content);
        po.setResource(this.resource);
        po.setNotes(this.notes);
        po.setVideoCover(this.videoCover);
        po.setPointPosition(this.pointPosition);
        return po;
    }

    public ScreenConfigure toOldPo(ScreenConfigure oldPo) {
        oldPo.setModule(this.model);
        oldPo.setContent(this.content);
        oldPo.setResource(this.resource);
        oldPo.setNotes(this.notes);
        oldPo.setVideoCover(this.videoCover);
        oldPo.setPointPosition(this.pointPosition);
        return oldPo;
    }
}
